#include "WhiteBloodCell.h"


WhiteBloodCell::WhiteBloodCell(void)
{
}


WhiteBloodCell::~WhiteBloodCell(void)
{
}

WhiteBloodCell::WhiteBloodCell(Position position)
{
	this->position.setX(position.getX());
	this->position.setY(position.getY());
	this->cure = false;
	this->killed = false;
	//this->radius = ;;
}

void WhiteBloodCell::moveDirection(double directionX, double directionY)
{
	this->position.setX(this->position.getX()+directionX*speed);
	this->position.setY(this->position.getY()+directionY*speed);
}

Position WhiteBloodCell::getPostion()
{
	return this->position;
}

bool WhiteBloodCell::isCuring()
{
	return this->cure;
}

Organ WhiteBloodCell::curing(Organ organ)
{
	if(!organ.isInfested())
	{
		this->cure = false;
		return organ;
	}
	this->cure = true;
	organ.cureFlu(this->curePoint);
	if(!organ.isInfested())
		this->cure = false;
	return organ;
}

double WhiteBloodCell::getRadius()
{
	return this->radius;
}

void WhiteBloodCell::kill()
{
	this->killed = true;
}

bool WhiteBloodCell::isKilled()
{
	return this->killed;
}